#include "widget.h"
#include "ui_widget.h"
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    // 访问到图片文件
    QPixmap pixmap(":/kun.png");

    if(pixmap.isNull())
        qDebug() << "Failed to load the image.";
    pixmap = pixmap.scaled(100,100);
    // 构建光标对象
    QCursor cursor(pixmap,10,10);
    this->setCursor(cursor);

}

Widget::~Widget()
{
    delete ui;
}

